3 int less(const void*a
, const void*b
){return*(short*)(a
)-*(short*)(b
);}
6 for (scanf("%hd", &c
); c
--; printf("%hd\n", 2*(a
[n
-1]-a
[0]))){
7 for (scanf("%hd", &n
), i
=0; i
<n
; scanf("%hd", &a
[i
++]));
8 qsort(a
, n
, sizeof(short), less
);